﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Web_Oto.Business;

namespace Web_Oto
{
    public partial class Payment : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                GetSeoInformations();
                GetPayment(); }
        }

        private void GetSeoInformations()
        {
            var seoBus = new SeoBus();
            var seo = seoBus.GetSeoPage("payment");
            if (seo != null)
            {
                Page.Title = seo.Title;
                Page.MetaDescription = seo.Description;
                Page.MetaKeywords = seo.Keyword;
            }
        }

        private void GetPayment()
        {
            var paymentBus = new PaymentBus();
            var payment = paymentBus.GetPayment();
            if(payment != null)
                ltrPayment.Text = payment.Description;
        }
    }
}